/**
 * 安卓白金英雄坛制作组 <br>
 * 文件名：FlyPoint.java <br>
 * 创建时间：2014-7-17 下午11:20:49 <br>
 * 所属项目：GmudEX <br>
 * @author ubun <br>
 */
package lostland.gmud.exv2.data;

import java.io.Serializable;

import lostland.gmud.exv2.Direction;
import lostland.gmud.exv2.Gmud;
import lostland.gmud.exv2.MainCharTile;

/**
 * 类名：FlyPoint <br>
 * 说明：传送点/玩家位置
 *
 * @author ubun
 */
public class FlyPoint implements Serializable {

	private static final long serialVersionUID = -7966123692336061381L;

	public int x;
	public int y;
	public int map;
	public Direction d;

	/**
	 * @param map 地图ID
	 * @param x    横坐标
	 * @param y    纵坐标
	 * @param d    朝向
	 */
	public FlyPoint(int map, int x, int y, Direction d) {
		this.map = map;
		this.x = x;
		this.y = y;
		this.d = d;
	}

	public FlyPoint(int map, int x, int y) {
		this.map = map;
		this.x = x;
		this.y = y;
		d = MainCharTile.getInstance().currentDirection;
	}

	public GmudMap getMap(){
		return Gmud.maps[map];
	}
}

